﻿#region Header

/*
Remote views based on linq
By

Pascal Hauser 
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

and

Raphael Gfeller
Dipl. Ing. in Informatik, Hochschule für Technik Rapperswil, 2006
Master Thesis, Hochschule für Technik Rapperswil, 2008-2010

*/

#endregion

#region Usings

using System.Collections.Generic;

#endregion

namespace Sebastof.Services.Interfaces {
	/// <summary>
	/// Is responsible for
	/// - returning the concrete data that has to be transferred for a given object
	/// - and to restore an object based on the transferred data
	/// for example, if a lazy loading strategy is applied, only value types are transferred. 
	/// If object values are requested they would reloaded.
	/// </summary>
	public interface ISerializationDataHandlingStrategyService {
		#region Public Methods

		/// <summary>
		/// Get data to serialize
		/// </summary>
		/// <param name="obj"></param>
		/// <returns></returns>
		Dictionary<string, object> GetDataToTransferFromObject(object obj);

		/// <summary>
		/// restore the object with the transfered data
		/// </summary>
		/// <param name="obj"></param>
		/// <param name="data"></param>
		void RestoreObjectFromTransferedData(object obj, Dictionary<string, object> data);

		#endregion
	}
}